<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var arr = [3,4,3,5,7,9];
			count(arr)
			
			function count(arr){
				var a = 0;
				for (var i = 0; i <arr.length; i++) {
					if(arr[i]==3){
						a++;
					}
				}
				
				console.log(3+"出现的次数:"+a);
			}
		</script>
	</body>
</html>
